package com.sanyou.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name = "copper_particle_check_records")
public class CopperParticleCheckRecord implements Serializable {
    //id
    @Id
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;
    //设备id
    @Column(name = "device_id")
    private String deviceId;
    //设备编号
    @Column(name = "device_no")
    private String deviceNo;
    //阴极板id
    @Column(name = "product_id")
    private Integer productId;
    //阴极板编号
    @Column(name = "product_code")
    private String productCode;
    //铜粒子类型
    @Column(name="type")
    private String type;
    //检测时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "datetime")
    private Date datetime;
    //A面铜粒子面积
    @Column(name="a_area")
    private Double aArea;
    //B面铜粒子面积
    @Column(name="b_area")
    private Double bArea;
    //A面合格标识
    @Column(name="a_isOk")
    private String aIsOk;
    //B面合格标识
    @Column(name="b_isOk")
    private String bIsOk;
    //A面图片名
    @Column(name = "a_image_name")
    private String aImageName;
    //B面图片名
    @Column(name = "b_image_name")
    private String bImageName;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "createtime")
    private Date createtime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public Double getaArea() {
        return aArea;
    }

    public void setaArea(Double aArea) {
        this.aArea = aArea;
    }

    public Double getbArea() {
        return bArea;
    }

    public void setbArea(Double bArea) {
        this.bArea = bArea;
    }

    public String getaIsOk() {
        return aIsOk;
    }

    public void setaIsOk(String aIsOk) {
        this.aIsOk = aIsOk;
    }

    public String getbIsOk() {
        return bIsOk;
    }

    public void setbIsOk(String bIsOk) {
        this.bIsOk = bIsOk;
    }

    public String getaImageName() {
        return aImageName;
    }

    public void setaImageName(String aImageName) {
        this.aImageName = aImageName;
    }

    public String getbImageName() {
        return bImageName;
    }

    public void setbImageName(String bImageName) {
        this.bImageName = bImageName;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Override
    public String toString() {
        return "CopperParticleCheckRecord{" +
                "id=" + id +
                ", deviceId='" + deviceId + '\'' +
                ", deviceNo='" + deviceNo + '\'' +
                ", productId=" + productId +
                ", productCode='" + productCode + '\'' +
                ", type='" + type + '\'' +
                ", datetime=" + datetime +
                ", aArea=" + aArea +
                ", bArea=" + bArea +
                ", aIsOk='" + aIsOk + '\'' +
                ", bIsOk='" + bIsOk + '\'' +
                ", aImageName='" + aImageName + '\'' +
                ", bImageName='" + bImageName + '\'' +
                ", createtime=" + createtime +
                '}';
    }
}
